package com.fhz.day003

/**
 * 时间:2021/10/15
 * @author msfeng
 * 简述: TODO
 */
class User(var value:Int){

    operator fun plus(v:User) : User{
        val i = value + v.value
        return User(i)
    }

    operator fun plus(v:Int) : User{
        val i = value + v
        return User(i)
    }

    operator fun minus(v:Int) : User{
        val i = value - v
        return User(i)
    }

    override fun toString(): String {
        return value.toString()
    }
}